import "package:ct_pa_majordomo/config/theme_vars.dart";
import "package:flutter/material.dart";

class SolidDivider extends StatelessWidget {
  final Color color;
  final Axis direction;
  final EdgeInsetsGeometry? padding;
  final double? width;
  final double? height;
  final double strokeWidth;

  const SolidDivider({
    super.key,
    this.color = ThemeVars.colorDivider,
    this.direction = Axis.horizontal,
    this.padding,
    this.width = double.infinity,
    this.height = double.infinity,
    this.strokeWidth = 1,
  });

  @override
  Widget build(BuildContext context) {
    bool horizontal = direction == Axis.horizontal;
    return Container(
      margin: padding,
      width: horizontal ? width : strokeWidth,
      height: horizontal ? strokeWidth : height,
      decoration:
          BoxDecoration(borderRadius: BorderRadius.circular(100), color: color),
    );
  }
}
